import { _decorator, Component, EventTouch, Node, Sprite } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('getTexture')
export class getTexture extends Component {
    @property(Sprite)
    sprite: Sprite;

    @property(Sprite)
    colorSprite: Sprite = null;

    protected onLoad(): void {
        this.sprite.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
    }

    start() {
        console.log(this.sprite.spriteFrame.texture.nativeAsset);
    }

    update(deltaTime: number) {}

    onTouchStart(touch: EventTouch) {}
}
